package com.jic.market.mapper;

import com.jic.market.entity.PromotionPreGoodsSku;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 预售商品表SKU表
 * @author : 
 * @email : 
 * @since : 2020-03-28 11:30:16
 * @version : v1.0.0
 */
@Mapper
public interface  PromotionPreGoodsSkuMapper {

    long insert(PromotionPreGoodsSku promotionPreGoodsSku);

    long delete(Long id);

    long update(PromotionPreGoodsSku promotionPreGoodsSku);

    PromotionPreGoodsSku queryByPrimaryKey(Long id);

    List<PromotionPreGoodsSku> query(PromotionPreGoodsSku promotionPreGoodsSku);

    List<PromotionPreGoodsSku> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("promotionPreGoodsSku") PromotionPreGoodsSku promotionPreGoodsSku);

    long queryPageCount(PromotionPreGoodsSku promotionPreGoodsSku);

    long deleteBatchByGoodsSkuId(@Param("promotionId") Long promotionId, @Param("goodsSkuIds") List<Long> goodsSkuIds);

    long updateByGoodsSkuId(PromotionPreGoodsSku presellProduct);

    List<Long> querySkuIdsBySpuIds(@Param("promotionId") Long promotionId, @Param("goodsSpuIds") List<Long> goodsSpuIds);
}